﻿@using Orchard.Utility.Extensions;
@{
    if (Model.Title != null) {
        Layout.Title = Model.Title;
    }

    Model.Classes.Add("content-item");
    Model.Attributes.Add("data-contentitem-id", Model.ContentItem.Id.ToString());

    var contentTypeClassName = ((string)Model.ContentItem.ContentType).HtmlClassify();
    Model.Classes.Add(contentTypeClassName);

    var tag = Tag(Model, "article");
}
@tag.StartElement
    <header>
        @Display(Model.Header)
        @if (Model.Meta != null) {
            <div class="metadata">
                @Display(Model.Meta)
            </div>
        }
        @if (Model.Actions != null) {
            <div class="actions">
                @Display(Model.Actions)
            </div>
        }
    </header>
    @Display(Model.Content)
    @if(Model.Footer != null) {
    <footer>
        @Display(Model.Footer)
    </footer>
    }
@tag.EndElement